<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selection_test(
  [
    '<div contenteditable>',
      '<div>',
        '^line 1<br>',
        '|line 2',
      '</div>',
      '<div>line 3</div>',
    '</div>',
  ],
  selection => selection.modify('move', 'forward', 'line'),
  [
    '<div contenteditable>',
      '<div>',
        'line 1<br>',
        '|line 2',
      '</div>',
      '<div>line 3</div>',
    '</div>',
  ],
  '1. Move forward line after BR');

selection_test(
  [
    '<div contenteditable>',
      '<div>^line 1</div>',
      '<div>|line 2</div>',
      '<div>line 3</div>',
    '</div>',
  ],
  selection => selection.modify('move', 'forward', 'line'),
  [
    '<div contenteditable>',
      '<div>line 1</div>',
      '<div>|line 2</div>',
      '<div>line 3</div>',
    '</div>',
  ],
  '2. Move forward line from start of DIV');
</script>
